package ru.papergames.battleserver.network.serverpackets.webserver;

import ru.papergames.battleserver.model.battle.AbstractBattle;

/**
 * @author: atroshanin
 * Date: 18.04.2010
 * Time: 23:04:58
 */
public class BattleCreated extends WebServerServerPacket {

    private AbstractBattle battle;

    public BattleCreated(AbstractBattle battle) {
        this.battle = battle;
    }

    @Override
    protected void writePacketId() {
        writeC(BATTLE_CREATED_PACKET_ID);
    }

    @Override
    protected void writePacketData() {
        writeD(battle.getBattleOrderId());
    }

    @Override
    public String getType() {
        return "[s] BattleCreated[" + BATTLE_CREATED_PACKET_ID + "]";
    }
}
